package org.example.service;

import com.baomidou.mybatisplus.extension.service.IService;
import org.example.model.entity.User;

import java.security.NoSuchAlgorithmException;


public interface UserService extends IService<User> {
    /*校验表单必填*/
    Boolean isValidRegistrationRequest(User user);

    //校验名字是否重复
    Boolean isExistsByUsername(String username);

    //校验手机号码是否重复
    Boolean isExistsByPhone(String phone);

    //校验邮箱是否重复
    Boolean isExistsByEmail(String email);

    User authenticate(String email, String password) throws NoSuchAlgorithmException;
}
